
#include <iostream>
#include <vector>

using namespace std;

/**
 * auto 可以自动推导类型
*/

int main()
{

    for (auto i : {1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
    {
        cout << i << " ";
    }
    cout << endl;

    vector<int> vec;
    vec.push_back(1);
    vec.push_back(2);
    vec.push_back(4);
    vec.push_back(5);

    for (auto v : vec)
    {
        cout << v << " ";
    }
    cout << endl;

    for (auto &v : vec)
    {
        v *= 3;
    }

    for (auto v : vec)
    {
        cout << v << " ";
    }
    cout << endl;

    return 0;
}